package com.zhang.zxx.boot.common.enums;

/**
 * MsgEunm:描述信息枚举
 *
 * @author zhangxiaoxiang
 * @date 2021年11月27日
 */
public enum MsgEunm {

    /**
     * 系统
     */
    SUCCESS("00000", "成功"),
    FAILED("00001", "失败"),
    SYS_ERROR("00002", "系统异常"),
    PARAM_ERROR("00003", "入参异常"),
    FILE_IO_EXCEPTION("00004", "文件读取IO异常"),
    HTTP_EXCEPTION("00005", "http请求异常"),
    REDIS_EXCEPTION("00006", "redis异常"),
    ACCOUNT_ERROR("00007", "账户异常"),
    USER_EXIST("00008", "用户账号已存在"),
    SENTINEL_BLOCK("00009", "服务繁忙，请稍后重试"),
    SENTINEL_FALLBACK("00010", "服务网络状态不佳，请稍后重试"),
    HEADER_ERROR("00800", "请求头参数不正确"),
    OPEN_SIGN_ERROR("00801", "签名有误"),
    OPEN_UID_ERROR("00802", "参数信息有误"),
    SYSTEM_NOT_AUTHORIZED("00401", "未授权"),

    /**
     * 远程调用(不返回给前端)
     */
    FEIGN_FAILED("00040", "远程调用失败,无服务补偿"),
    FEIGN_FAILED_COMPENSATE_MQ("00043", "远程调用失败,MQ补偿"),
    FEIGN_FAILED_COMPENSATE_LTS("00044", "远程调用失败,定时任务补偿"),


    /**
     * 用户
     */
    USER_NOT_EXIST("00100", "用户不存在异常"),
    USER_UNKNOWN_USER_TYPE("00101", "未知用户类型用户"),
    USER_ACCOUNT_OR_PASSWORD_WRONG("00102", "账号或密码错误"),
    USER_NAME_DOUBLE("00103", "登录名已经存在"),
    ADD_USER_ROLE_ERROR("00113", "不能给普通用户赋予最高管理员权限"),
    ADD_USER_ERROR("00104", "新增用户失败"),
    DEL_USER_ERROR("00105", "删除用户失败"),
    DISABLE_USER_ERROR("00123", "禁用用户失败"),
    DISABLE_USER_ADMIN_ERROR("00117", "用户为企业最高管理员,禁用用户失败"),
    DELETE_USER_ADMIN_ERROR("00118", "用户为企业最高管理员,删除用户失败"),
    UPDATE_USER_ERROR("00116", "修改用户失败"),
    RESET_PSW_USER_ERROR("00119", "重置用户密码失败"),
    DEL_USER_SEAT_ERROR("00121", "成员已经绑定坐席,无法删除"),
    USER_DISABLE("00122", "该用户已被禁用"),
    USER_NAME_TOO_LONG("00124", "登录名过长");


    private final String code;
    private final String message;

    MsgEunm(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }

}





































